package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.PermissionTree;
import com.itheima.stock.pojo.entity.SysPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_permission(权限表（菜单）)】的数据库操作Mapper
* @createDate 2024-07-21 11:07:01
* @Entity com.itheima.stock.pojo.entity.SysPermission
*/
public interface SysPermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysPermission record);

    int insertSelective(SysPermission record);

    SysPermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysPermission record);

    int updateByPrimaryKey(SysPermission record);

    List<SysPermission> getPermissionList();

    List<PermissionTree> getPermissionTree();

    int addPermission(@Param("id")String id,@Param("type") String type, @Param("title") String title, @Param("pid") String pid, @Param("url") String url, @Param("name") String name, @Param("icon") String icon, @Param("perms") String perms, @Param("method") String method, @Param("code") String code, @Param("orderNum") String orderNum);

    int updatePermission(@Param("id") String id, @Param("type") String type, @Param("title") String title, @Param("pid") String pid, @Param("url") String url, @Param("name") String name, @Param("icon") String icon, @Param("perms") String perms, @Param("method") String method, @Param("code") String code, @Param("orderNum") String orderNum);

    int deletePermission(@Param("permissionId") Long permissionId);
}
